/** Boundary class 
*@author Raymond
*@version 2012-03-11
/*******************************************
*@author Syrings
*@version 2012-03-31 
*@Modification: Controller is used to select the event card randomly, calculate the score that player get
Return all the result to eventWindow for display
Edited method: displaySelectedEvent(), showQuestion(),showMC()
Created method: showResult(), getPlayerAns()
/********************************************/
package festival;

import player.*;

import java.util.Scanner;
public class festivalWindow {

        private Player selectedPlayer;
        private festival pickedFestival;
        
        /** Greet player that you just step on festival cell*/
        public void greet(Player player){
			selectedPlayer =  player;
			
			System.out.println( "Hello " + selectedPlayer.getRole() +
							"\nYou just step in to festival Cell!");
			
			
			/** Prompt user to press Enter*/
			System.out.println("Press Enter to pick a random Festival: ");
			Scanner keyboard = new Scanner(System.in);
			keyboard.nextLine();
			
			festivalController festController = new festivalController();
			pickedFestival = festController.getSelectedFestival();
			showSelectedFestival();
        }
        
        public void showSelectedFestival(){
            System.out.println(pickedFestival.getDecription());
            festivalController festControl = new festivalController();
            festControl.updateSEPoints(selectedPlayer, pickedFestival.getSE());
    		
            PlayerIO print = new PlayerIO();
    		print.updateSEValue(selectedPlayer);
    		System.out.println("Festival Stop here.");
    		System.out.println("**************************************");
        }
        
        public Player getSelectedPlayer() {
                return selectedPlayer;
        }

        public void setSelectedPlayer(Player selectedPlayer) {
                this.selectedPlayer = selectedPlayer;
        }
}